]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm: fix banner allocation computation
authorRay Strode <rstrode@redhat.com>
Thu, 25 Jun 2015 19:39:58 +0000 (15:39 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 25 Jun 2015 20:04:14 +0000 (16:04 -0400)
The code to figure how how much room that banner had was wrong.
This commit fixes it.

https://bugzilla.gnome.org/show_bug.cgi?id=751517

js/gdm/loginDialog.js

index 38f53d476f73440514876f9b4f1963da1e226fa6..0dabacdc2e9c568217e5151c84d50d8fcf0dddd8 100644 (file)
@@ -584,7 +584,14 @@ const LoginDialog = new Lang.Class({
         // try a different layout, or if we have what extra space we
         // can hand out
         if (bannerAllocation) {
-            let leftOverYSpace = dialogHeight - bannerHeight - authPromptHeight - logoHeight;
+            let bannerSpace;
+
+            if (authPromptAllocation)
+                bannerSpace = authPromptAllocation.y1 - bannerAllocation.y1;
+            else
+                bannerSpace = 0;
+
+            let leftOverYSpace = bannerSpace - bannerHeight;
 
             if (leftOverYSpace > 0) {
                  // First figure out how much left over space is up top